export default {
    // 购物车件数
  	totalCount: (state) => {
      return state.cartList.reduce((total, item) => total + item.num, 0);
    },
    // 购物车总金额
    totalAmount: (state) => {
      return state.cartList.reduce((total, item) => total + item.num * item.salePrice, 0);
    }
}